#dashboard后台路由
from django.conf.urls import url
from . import user_views,type_views,login_views,goods_views,order_views

urlpatterns = [
	####访问页面路由

	#访问dash首页
    url(r'^index_page/$',user_views.index,name='dash_index_page'),

    ###登录模块
    #访问dash登录页面
    # url(r'^index/$',login_views.login_page),
    url(r'^login_page/$',login_views.login_page,name='dash_login_page'),
    #申请验证码图片
    url(r'^verifycode/$',login_views.verifycode,name='get_verifycode'),

    ###用户模块
    #访问dash添加用户页面
    url(r'^user/add_user_page$',user_views.add_user_page,name='dash_add_user_page'),
    #访问dash用户列表页面
    url(r'^user/user_list_page$',user_views.user_list_page,name='dash_user_list_page'),
    url(r'^user/user_list_page/(?P<p_index>[0-9]+)$',user_views.user_list_page,name='dash_user_list_page'),
    #访问dash编辑用户信息页面
    url(r'^user/user_edit_page$',user_views.user_edit_page,name='dash_user_edit_page'),

    ###分类模块
    #访问添加商品分类页面
    url(r'^type/add_type_page$',type_views.add_type_page,name='dash_add_type_page'),
    #访问商品分类列表页面
    url(r'^type/type_list_page$',type_views.type_list_page,name='dash_type_list_page'),
    url(r'^type/type_list_page(?P<p_index>[0-9]+)$',type_views.type_list_page,name='dash_type_list_page'),
    
    ###商品模块
    #访问商品添加页面
    url(r'^goods/add_goods_page$',goods_views.add_goods_page,name='dash_add_goods_page'),
    #访问商品列表页面
    url(r'^goods/goods_list_page$',goods_views.goods_list_page,name='dash_goods_list_page'),
    url(r'^goods/goods_list_page/(?P<p_index>[0-9]+)$',goods_views.goods_list_page,name='dash_goods_list_page'),
    #访问商品信息修改页面
    url(r'^goods/goods_edit_page$',goods_views.goods_edit_page,name='dash_goods_edit_page'),

    ###订单模块
    #获取所有订单
    url(r'^order/order_list_page$',order_views.order_list_page,name='dash_order_list_page'),
    url(r'^order/order_list_page/(?P<p_index>[0-9]+)$',order_views.order_list_page,name='dash_order_list_page'),

    #获取订单详情页面
    url(r'^order/order_detail_page$',order_views.order_detail_page,name='dash_order_detail_page'),

    #获取订单编辑页面
    url(r'^order/order_edit_page$',order_views.order_edit_page,name='dash_order_edit_page'),





    
    ####执行操作路由

    ###登录模块
    #执行dash用户登录
    url(r'^dologin/$',login_views.dologin,name='dash_dologin'),
    #注销登录操作
    url(r'^dologout/$',login_views.dologout,name='dash_dologout'),

    ###用户模块
    #执行用户添加
    url(r'^user/add_user$',user_views.add_user,name='dash_add_user'),
    #更新修改用户信息
    url(r'^user/edit_user$',user_views.edit_user,name='dash_edit_user'),
    #删除用户信息
    url(r'^user/del_user$',user_views.del_user,name='dash_del_user'),

    ###分类模块
    #执行商品分类添加
    url(r'^type/add_type$',type_views.add_type,name='dash_add_type'),
    #执行删除商品分类
    url(r'^type/del_type$',type_views.del_type,name='dash_del_type'),
    #执行商品分类编辑
    url(r'^type/edit_type$',type_views.edit_type,name='dash_edit_type'),

    ###商品模块
    #执行商品添加
    url(r'^goods/add_goods$',goods_views.add_goods,name='dash_add_goods'),
    #执行商品删除
    url(r'^goods/del_goods$',goods_views.del_goods,name='dash_del_goods'),
    #执行商品的修改
    url(r'^goods/edit_goods$',goods_views.edit_goods,name='dash_edit_goods'),

    ###订单模块
    #执行修改订单信息
    url(r'^order/edit_order$',order_views.edit_order,name='dash_edit_order'),


]
